[SYNPY-1786] Added examples for getting data into a grid#1335
[SYNPY-1786] Added examples for getting data into a grid#1335andrewelamb wants to merge 12 commits intodevelopfrom
Conversation
|
|
||
| # 5. Store the record set with the path to the CSV file as an annotation. | ||
| # TODO: Add functionality to store data in a RecordSet programmatically | ||
| # This doesn't store the data in the RecordSet |
There was a problem hiding this comment.
What does this comment mean?
There was a problem hiding this comment.
I clarified it, but essentially it's a placeholder for SYNPY-1781
There was a problem hiding this comment.
Got it. Technically you can already do this but we would have to merge the CSV client side and upload a new complete copy of the data.
We should wait though to use the import featurem
BryanFauble
left a comment
There was a problem hiding this comment.
Thanks for adding these examples, they'll be really helpful for folks getting started with Grid curation. There are a few small things to clean up before we merge.
Note: This comment was drafted with AI assistance and reviewed by me for accuracy.
linglp
left a comment
There was a problem hiding this comment.
@andrewelamb Thanks for putting together the documentation. In your example, you are reading the data model CSV and trying to use its rows as annotation data, and even when I tested with our own example CSVs, headers like "Valid Values" (it should be ValidValues) will trigger an error.
Also, based on my understanding, Bulk RNA-seq Assay or Biospecimen would be better examples for file-based tasks since they describe actual data files. Patient records is tabular data records rather than file-based in my opinions.
After you finish all the changes, could you run both scripts on your end to make sure that everything is working smoothly? I had some issues when I tested it out on my end.
|
@BryanFauble It looks like you requested a change, could you re-review? |
| syn.login() | ||
|
|
||
| # 3. Get annotations from CSV file | ||
| annotations = pd.read_csv(CSV_PATH).to_dict(orient="records") |
There was a problem hiding this comment.
This currently bypasses the grid altogether by pushing data in as annotations. Can we add a TODO comment here?
Nit: Could we leverage the entity view API to push the CSV directly into the entity view?
|
@andrewelamb Today I happened to revisit this part of the code, and I realized that there's probably something wrong. I took a look at the UI, but I realized that there's no data that got into the grid/dataset:
As you can see in the UI, the grid is completely empty with only column headers. When you wrote the tutorial, did you check if the data got into the record set? Also, here's what the patient schema looks like if I printed it out: In your |

Problem:
Curator Extension users asked for simple example scripts for adding data into a grid for both file-based and record-based curation.
Solution:
Two simple examples were added.